﻿package com.alpheus.event
{
	/**
	 * 日志事件
	 */

	import flash.events.Event;


	public class LoggerEvent extends Event
	{
		/**
		 *事件数据对象
		 */
		public var params:Object;
		/**
		 *警告级别
		 */
		public static const WARNING:String="warning";
		/**
		 *信息通知级别
		 */
		public static const INFO:String="info";
		/**
		 *错误级别
		 */
		public static const ERROR:String="error";

		/**
		 *日志事件构造函数
		 * @param type
		 * @param params
		 *
		 */
		public function LoggerEvent(type:String, params:Object=null)
		{
			super(type);
			this.params=params;
		}

		/**
		 *转换为字符串
		 * @return
		 *
		 */
		override public function toString():String
		{
			return formatToString("LoggerEvent", "type", "bubbles", "cancelable", "eventPhase", "params");
		}

		/**
		 *复制事件
		 * @return
		 *
		 */
		override public function clone():Event
		{
			return new LoggerEvent(this.type, this.params);
		}

	}

}